<template>
  <div id="app">
    <keep-alive :include="keepAliveViews">
      <router-view></router-view>
    </keep-alive>
    <el-backtop target="#app" />
  </div>
</template>
<script>
import { routes } from './router'
export default {
  name: 'App',
  data() {
    return {}
  },
  computed: {
    keepAliveViews() {
      return routes
        .filter((f) => f?.meta?.keepAlive)
        .map((m) => m.name)
    },
  },
}
</script>
<style lang="less">
* {
  margin: 0;
  padding: 0;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
}
#app {
  overflow: auto;
}
</style>
